home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gcc / ixemul_src.lha / ixemul-41.0 / gen_library / crypt.c < prev    next >
C/C++ Source or Header  |  1994-12-31  |  2KB  |  79 lines

  1. /* Stubs for crypt functions which may be export restricted by stupid USA
  2.  * ITAR (International Trade in Arms Regulations).
  3.  *
  4.  * To compile a version of the library in the free world (IE outside the USA)
  5.  * simply replace this file with the real crypt.c, which should be widely
  6.  * available on ftp servers.
  7.  * 
  8.  */
  9.  
  10. /*
  11.  * Return a pointer to static data consisting of the "setting"
  12.  * followed by an encryption produced by the "key" and "setting".
  13.  */
  14.  
  15. char *
  16. crypt (key, setting)
  17.      register const char *key;
  18.      register const char *setting;
  19. {
  20.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  21.   return ((char *) 0);
  22. }
  23.  
  24. /*
  25.  * Encrypt (or decrypt if num_iter < 0) the 8 chars at "in" with abs(num_iter)
  26.  * iterations of DES, using the the given 24-bit salt and the pre-computed key
  27.  * schedule, and store the resulting 8 chars at "out" (in == out is permitted).
  28.  *
  29.  * NOTE: the performance of this routine is critically dependent on your
  30.  * compiler and machine architecture.
  31.  */
  32.  
  33. int
  34. des_cipher (in, out, salt, num_iter)
  35.      const char *in;
  36.      char *out;
  37.      long salt;
  38.      int num_iter;
  39. {
  40.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  41.   return (0);
  42. }
  43.  
  44. /*
  45.  * Set up the key schedule from the key.
  46.  */
  47.  
  48. int
  49. des_setkey (key)
  50.      register const char *key;
  51. {
  52.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  53.   return (0);
  54. }
  55.  
  56. /*
  57.  * "encrypt" routine (for backwards compatibility)
  58.  */
  59.  
  60. int
  61. encrypt (block, flag)
  62.     register char *block;
  63.     int flag;
  64. {
  65.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  66.   return (0);
  67. }
  68.  
  69. /*
  70.  * "setkey" routine (for backwards compatibility)
  71.  */
  72.  
  73. setkey (key)
  74.     register const char *key;
  75. {
  76.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  77.   return (0);
  78. }
  79.